package com.itheima.charstream;

import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;

/*
创建对象时 直接 指定编码集
 */
public class Demo06 {

    public static void main(String[] args) throws IOException {

        FileWriter writer = new FileWriter("day13\\b.txt", Charset.forName("gbk"));
        writer.write("嘿嘿嘿");
        writer.close();

    }


}
